home *** CD-ROM | disk | FTP | other *** search
/ Champak 64 / Volume 64 - JOGO DISK .iso / Games / skecthpad.swf / scripts / frame_35 / DoAction.as < prev   
Text File  |  2008-04-25  |  3KB  |  89 lines

  1. function stopCirkel()
  2. {
  3.    _root.createEmptyMovieClip("drawline" + _root.pencil.symbolnumber,_root.pencil.symbolnumber);
  4.    with(_root.pencil)
  5.    {
  6.       circcenterX = circstartx;
  7.       circcenterY = circstarty;
  8.       circstraal = circposx - circstartx;
  9.       circalpha = 0.7853981633974483;
  10.       circcontrStraal = circstraal / Math.cos(circalpha / 2);
  11.       _root["drawline" + symbolnumber].lineStyle(_root.setthickness,_root.setcolor,_root.setopacity);
  12.       _root["drawline" + symbolnumber].moveTo(circcenterX + circstraal,circcenterY);
  13.       circhoek = 0;
  14.       i = 0;
  15.       while(i < 8)
  16.       {
  17.          circhoek += circalpha;
  18.          circhoekMid = circhoek - circalpha / 2;
  19.          circcx = circcenterX + Math.cos(circhoekMid) * circcontrStraal;
  20.          circcy = circcenterY + Math.sin(circhoekMid) * circcontrStraal;
  21.          circpx = circcenterX + Math.cos(circhoek) * circstraal;
  22.          circpy = circcenterY + Math.sin(circhoek) * circstraal;
  23.          _root["drawline" + symbolnumber].curveTo(circcx,circcy,circpx,circpy);
  24.          if(circpy <= 110 + _root.setthickness * 2)
  25.          {
  26.             circelling = false;
  27.          }
  28.          else if(circpy >= 440 - _root.setthickness * 2)
  29.          {
  30.             circelling = false;
  31.          }
  32.          else if(circpx <= 130 + _root.setthickness * 2)
  33.          {
  34.             circelling = false;
  35.          }
  36.          else if(circpx >= 680 - _root.setthickness * 2)
  37.          {
  38.             circelling = false;
  39.          }
  40.          i++;
  41.       }
  42.    }
  43. }
  44. function stopCirkel2()
  45. {
  46.    _root.createEmptyMovieClip("drawline" + _root.pencil.symbolnumber,_root.pencil.symbolnumber);
  47.    with(_root.pencil)
  48.    {
  49.       circcenterX = circstartx;
  50.       circcenterY = circstarty;
  51.       circstraal = circposx - circstartx;
  52.       circalpha = 0.7853981633974483;
  53.       circcontrStraal = circstraal / Math.cos(circalpha / 2);
  54.       _root["drawline" + symbolnumber].beginFill(_root.setcolor,_root.setopacity);
  55.       _root["drawline" + symbolnumber].lineStyle(1,0,0);
  56.       _root["drawline" + symbolnumber].moveTo(circcenterX + circstraal,circcenterY);
  57.       circhoek = 0;
  58.       i = 0;
  59.       while(i < 8)
  60.       {
  61.          circhoek += circalpha;
  62.          circhoekMid = circhoek - circalpha / 2;
  63.          circcx = circcenterX + Math.cos(circhoekMid) * circcontrStraal;
  64.          circcy = circcenterY + Math.sin(circhoekMid) * circcontrStraal;
  65.          circpx = circcenterX + Math.cos(circhoek) * circstraal;
  66.          circpy = circcenterY + Math.sin(circhoek) * circstraal;
  67.          _root["drawline" + symbolnumber].curveTo(circcx,circcy,circpx,circpy);
  68.          if(circpy <= 110 + _root.setthickness * 2)
  69.          {
  70.             circelling = false;
  71.          }
  72.          else if(circpy >= 440 - _root.setthickness * 2)
  73.          {
  74.             circelling = false;
  75.          }
  76.          else if(circpx <= 130 + _root.setthickness * 2)
  77.          {
  78.             circelling = false;
  79.          }
  80.          else if(circpx >= 680 - _root.setthickness * 2)
  81.          {
  82.             circelling = false;
  83.          }
  84.          i++;
  85.       }
  86.       _root["drawline" + symbolnumber].endFill();
  87.    }
  88. }
  89.